package com.lun.blog.service;

import com.lun.blog.pojo.Blog;
import com.lun.blog.vo.BlogQuery;
import com.lun.blog.vo.SearchQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


public interface BlogService {

    Blog getBlog(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id,Blog blog);

    boolean deleteBlog(Long id);

    Blog findBlogByCreateTime();

    List<Map> findCountByTypeId();

    Page<Blog> ListByPublished(Pageable pageable);

    Page<Blog> likeByBlog(SearchQuery query, Pageable pageable);

    Long countBlog();

    Long countView();

    Blog findById(Long id);

}
